def shi():
    print('静夜思---李白')
    print('床前明月光，疑是地上霜')
    print('举头望明月，低头思故乡')


def add():
    a, b = 6, 7
    s = a * b
    print('a和b的体积为:', s)
    return a + b


c = add()
print(c)


def add(a, b):
    print(a + b)


add(1, 3)


c = 7
d = 9


add(4*5, 9 % 3)


e = 0
add(8, e * 4 + 3)




def sc(a , b , c):
    print('222成绩为:', a)
    print('333成绩为:', b)
    print('444成绩为:', c)
sc(30,40,50)
sc(b=50, c=98, a=30)


def reg(name, age, sex='女'):
    print('姓名:{} 年龄:性别:{}'.format(name, age, sex))


reg('小丽', 20)
reg('小张', 21, '男')

def fav(*fr):
    print('我喜欢的水果有:')
    for i in fr:
        print(i)


fav('苹果')
fav('苹果', '香蕉', '芒果')
fav('苹果', '西瓜', '橙子', '榴莲', '草莓')


def show(a, b, * l):
    print(a)
    print(b)
    print(l)


show(1, 2, 3, 4, 5, 6, 7, 8, 99)


def rectangie():
    a = int(input('请输入矩形的长(9)'))
    b = int(input('请输入矩形的宽（8)'))
    s = a*b
    c = 2*(a+b)
    print('该矩形面积为:', s)
    print('该矩形周长为:', c)
rectangie()


def re(a, b, c, d, ):
    return a+b, c*d, a-c


ss = re(1, 2, 3, 4)
print(ss)


def fu():
    a = 20
    return a


a = 1
print(a)
c = fu()
print(c)


def f(n):
    if n <= 1:
        return 1
    else:
        return n * f(n - 1)


num = int(input('请输入一个正整数:'))
s = f(num)
print(num, '的阶乘是:', s)



def su(n):
    if n == 1:
        return 1
    else:
        return n + su(n - 1)


print((su(100)))

def fibo(n):
    if n <= 2:
        return
    else:
        return fibo(n - 1) + fibo(n - 2)
    print('斐波那契数列的第{}项为{}'.format(7, fibo(7)))


sum = lambda a, b, c: a + b + c
print(sum(1, 2, 3))

fun = lambda m: m ** 2
print(fun(5))
